package edu.westga.sketchit2009cs.tester;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import edu.westga.sketchit2009cs.gameEngine.WordGame;

/**
 * This tester test the WordGame class which checks to see if two words are
 * equal or not.
 * 
 * @author Steven Campbell
 * 
 */
public class WordGuessingTester {
	private WordGame wordComparer;
	public String correctWord;
	public String incorrectWord;
	public String guessedWord;

	@Before
	public void setUp() throws Exception {
		wordComparer = new WordGame();
		correctWord = "pumpkin";
		incorrectWord = "witch";
		guessedWord = "pumpkin";
	}

	@Test
	public void shouldReturnFalseWhenIncorrectWordIsGuessed() {
		assertEquals(wordComparer.checkAnswer(correctWord, incorrectWord),
				false);
	}

	@Test
	public void shouldReturnTrueWhenCorrectWordIsGuessed() {
		assertEquals(wordComparer.checkAnswer(correctWord, guessedWord), true);
	}

}
